normalizeImage

fun normalizeImage(factor: Float, luminosity: Float? = null)

Renormalizes the luminosity of the image pixels.

Each pixel value is multiplied by a scaling factor calculated as factor / luminosity. If no specific luminosity is provided, the function automatically calculates the average luminosity of the current image calling averageLuminosity.